package model

import "time"

type OauthOauthconfig struct {
	Id          int       `db:"id"`
	Type        string    `db:"type"`
	Appkey      string    `db:"appkey"`
	Appsecret   string    `db:"appsecret"`
	CallbackUrl string    `db:"callback_url"`
	IsEnable    bool      `db:"is_enable"`
	CreatedTime time.Time `db:"created_time"`
	LastModTime time.Time `db:"last_mod_time"`
}

func (o *OauthOauthconfig) TableName() string {
	return "oauth_oauthconfig"
}

type OwnTracksOwntracklog struct {
	Id          int       `db:"id"`
	Tid         string    `db:"tid"`
	Lat         float64   `db:"lat"`
	Lon         float64   `db:"lon"`
	CreatedTime time.Time `db:"created_time"`
}

func (o *OwnTracksOwntracklog) TableName() string {
	return "owntracks_owntracklog"
}

type OauthOauthuser struct {
	Id          int       `db:"id"`
	Openid      string    `db:"openid"`
	Nickname    string    `db:"nickname"`
	Token       string    `db:"token"`
	Picture     string    `db:"picture"`
	Type        string    `db:"type"`
	Email       string    `db:"email"`
	Metadata    string    `db:"metadata"`
	CreatedTime time.Time `db:"created_time"`
	LastModTime time.Time `db:"last_mod_time"`
	AuthorId    int       `db:"author_id"`
}

func (o *OauthOauthuser) TableName() string {
	return "oauth_oauthuser"
}
